Be sure to update all packages from a git source
authorAlex Crichton <alex@alexcrichton.com>
Wed, 29 Oct 2014 18:42:45 +0000 (11:42 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 29 Oct 2014 18:50:24 +0000 (11:50 -0700)
commitce14ff2f77ce26ed2fc8a2005e700bc930ea6c28
tree9bbc921fbb72dee5d14f388f00ff4af691df7083
parent947a62b7db0a105d7ba70d3ea77be0a21e7e1bd9
Be sure to update all packages from a git source

With the recent resolve rewrite, `cargo update -p foo` would only update one
package in a git repository, even if the repository provided many packages.
Cargo does not currently support depending on the same git repository source
with different precise revisions, and this would cause errors down the line
depending on what happened.

This adds a fix to the `resolve_with_previous` method to ensure that any
non-registry sources being updated will not have any locked packages inside them
which would result in an invalid lockfile.
src/cargo/ops/resolve.rs
tests/test_cargo_compile_git_deps.rs